package com.chaosj.webmagic.convert;

import com.chaosj.webmagic.dto.SearchEnums;
import com.chaosj.webmagic.dto.SearchResponseDto;
import com.chaosj.webmagic.dto.idiomschina.LexIconResponseDto;
import us.codecraft.webmagic.Page;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;

/**
 * @className: LexiconConvertHandler
 * @description:
 * @author: caoyangjie
 * @date: 2021/8/12
 **/
public class IdiomChinaConvertHandler extends LexiconConvertHandler<LexIconResponseDto>{

    @Override
    public boolean support(SearchEnums instance) {
        return SearchEnums.LEXICON.equals(instance);
    }

    @Override
    public String holdTarget(String target) {
        return SearchEnums.LEXICON.getDomain()+target.substring(1);
    }
}
